package com.dreamsail.core.frame;

import com.dreamsail.core.model.system.HeadMessage;

/**
 * 上下文管理
 */
public class ContentManager {

    private static ThreadLocal<HeadMessage> headMessageThreadLocal = new ThreadLocal<>();

    public static void setHeadMessage(HeadMessage headMessage){
        headMessageThreadLocal.set(headMessage);
    }

    public static HeadMessage getHeadMessage(){
        return headMessageThreadLocal.get();
    }

    public static void clear(){
        headMessageThreadLocal.remove();
    }
}
